home *** CD-ROM | disk | FTP | other *** search
/ Delphi 2.0 - Programmer's Utilities Power Pack / Delphi 2.0 Programmer's Utilities Power Pack.iso / s_to_z / xbformat / xbconst.pas next >
Encoding:
Pascal/Delphi Source File  |  1996-09-15  |  4.4 KB  |  154 lines

  1. { XBCONST.PAS - Common constants for Xphiles
  2.  
  3. Xphiles(tm) source code
  4. Copyright (c) 1995 - 1996 by Interface Technologies
  5. All Rights Reserved Worldwide
  6.  
  7. }
  8. unit XbConst;
  9.  
  10. interface
  11.  
  12. uses Classes, SysUtils;
  13.  
  14. const
  15.  
  16.     { File I/O values }
  17.    F_ERROR         = -1;    { File error }
  18.  
  19.    { FSeek(), FileSeek() options }
  20.  
  21.    FS_SET          = 0;     { Seek from beginning of file }
  22.    FS_RELATIVE     = 1;     { Seek from current file position }
  23.    FS_END          = 2;     { Seek from end of file }
  24.  
  25.    { FOPEN() access modes }
  26.  
  27.    FO_READ          = 0;     { Open for reading (default) }
  28.    FO_WRITE         = 1;     { Open for writing }
  29.    FO_READWRITE     = 2;     { Open for reading or writing }
  30.  
  31.    { FOPEN() sharing modes (combine with open mode using +) }
  32.  
  33.    FO_COMPAT        =  0;       { Compatibility mode (default) }
  34.    FO_EXCLUSIVE     = 16;       { Exclusive use (other processes have no access) }
  35.    FO_DENYWRITE     = 32;       { Prevent other processes from writing }
  36.    FO_DENYREAD      = 48;       { Prevent other processes from reading }
  37.    FO_DENYNONE      = 64;       { Allow other processes to read or write }
  38.    FO_SHARED        = 64;       { Same as FO_DENYNONE }
  39.  
  40.    { FCreate() file attribute modes }
  41.  
  42.    FC_NORMAL        = 0;        { Create normal read/write file (default) }
  43.    FC_READONLY      = 1;        { Create read-only file }
  44.    FC_HIDDEN        = 2;        { Create hidden file }
  45.    FC_SYSTEM        = 4;        { Create system file }
  46.  
  47.    { FCopyBytes() values }
  48.    FC_BUFSIZE     = 65528; { Maximum GetMem() in 16-bit }
  49.  
  50.    { FSetDevMode() device modes }
  51.  
  52.    FD_RAW           = 1;
  53.    FD_BINARY        = 1;
  54.    FD_COOKED        = 2;
  55.    FD_TEXT          = 2;
  56.    FD_ASCII         = 2;
  57.  
  58.    VowelChars  : set of char = [ 'A', 'E', 'I', 'O', 'U' ];
  59.  
  60.     _SET_EXACT       =   1;
  61.     _SET_FIXED       =   2;
  62.     _SET_DECIMALS    =   3;
  63.     _SET_DATEFORMAT  =   4;
  64.     _SET_EPOCH       =   5;
  65.     _SET_PATH        =   6;
  66.     _SET_DEFAULT     =   7;
  67.  
  68.     _SET_EXCLUSIVE   =   8;
  69.     _SET_SOFTSEEK    =   9;
  70.     _SET_UNIQUE      =  10;
  71.     _SET_DELETED     =  11;
  72.  
  73.     _SET_CANCEL      =  12;
  74.     _SET_DEBUG       =  13;
  75.     _SET_TYPEAHEAD   =  14;
  76.  
  77.     _SET_COLOR       =  15;
  78.     _SET_CURSOR      =  16;
  79.     _SET_CONSOLE     =  17;
  80.     _SET_ALTERNATE   =  18;
  81.     _SET_ALTFILE     =  19;
  82.     _SET_DEVICE      =  20;
  83.     _SET_EXTRA       =  21;
  84.     _SET_EXTRAFILE   =  22;
  85.     _SET_PRINTER     =  23;
  86.     _SET_PRINTFILE   =  24;
  87.     _SET_MARGIN      =  25;
  88.  
  89.     _SET_BELL        =  26;
  90.     _SET_CONFIRM     =  27;
  91.     _SET_ESCAPE      =  28;
  92.     _SET_INSERT      =  29;
  93.     _SET_EXIT        =  30;
  94.     _SET_INTENSITY   =  31;
  95.     _SET_SCOREBOARD  =  32;
  96.     _SET_DELIMITERS  =  33;
  97.     _SET_DELIMCHARS  =  34;
  98.  
  99.     _SET_WRAP        =  35;
  100.     _SET_MESSAGE     =  36;
  101.     _SET_MCENTER     =  37;
  102.     _SET_SCROLLBREAK =  38;
  103.  
  104.     _SET_EVENTMASK   =  39;
  105.     _SET_VIDEOMODE   =  40;
  106.  
  107.     _SET_MBLOCKSIZE  =  41;
  108.     _SET_MFILEEXT    =  42;
  109.  
  110.     _SET_STRICTREAD  =  43;
  111.     _SET_OPTIMIZE    =  44;
  112.     _SET_AUTOPEN     =  45;
  113.     _SET_AUTORDER    =  46;
  114.     _SET_AUTOSHARE   =  47;
  115.    _SET_CENTURY     =  48;
  116.  
  117. type
  118.  
  119.    EXpCompat  = class( Exception );
  120.  
  121.    xbBlockProc = procedure( xVars : array of const );
  122.    xbBlockFunc = function( xVars : array of const ) : TVarRec;
  123.    xbBlockBool = function( xVars : array of const ) : boolean;
  124.    CharSet     = set of char;
  125.  
  126. var
  127.    XbAlternate        : boolean;  { SET ALTERNATE ... toggle }
  128.     XbAltFile             : string;    { SET ALTERNATE TO ... value }
  129.    XbAltHandle        : Integer;  { SET ALTERNATE ... output handle }
  130.    XbCentury          : boolean;  { SET CENTURY ... toggle }
  131.     XbColor                 : string;    { SET COLOR TO ... toggle }
  132.    XbConsole          : boolean;  { SET CONSOLE ... value }
  133.    XbDateFormat       : string;   { SET DATE FORMAT ... value }
  134.    XbDecimal          : Integer;  { SET DECIMAL ... value }
  135.     XbDefault             : string;    { SET DEFAULT TO ... value }
  136.     XbDeleted             : boolean;    { SET DELETED ... toggle }
  137.    XbExact            : boolean;  { SET EXACT ... toggle }
  138.     XbExclusive            : boolean;    { SET EXCLUSIVE ... toggle }
  139.     XbFixed                 : boolean;  { SET FIXED ... toggle }
  140.     XbMargin             : integer;    { SET MARGIN TO ... value }
  141.     XbPath                 : string;    { SET PATH TO ... value }
  142.    XbPrinter          : boolean;  { SET PRINTER ... toggle }
  143.     XbPrintFile            : string;    { SET PRINTER TO ... value }
  144.    XbPrinterHandle    : Integer;  { SET PRINTER ... handle }
  145.     XbSoftSeek            : boolean;    { SET SOFTSEEK ... toggle }
  146.     XbUnique             : boolean;  { SET UNIQUE ... toggle }
  147. {$IFDEF XP_APOLLO}
  148.    XbApolloEnv       : TApolloEnv;  { Apollo Environment settings }
  149. {$ENDIF}
  150.  
  151. implementation
  152.  
  153. end.
  154.